﻿@model ICDA.Web.Models.UserModel
@{
    ViewBag.Title = "MyAccount";
}
@section cssJavascript
{
<script src="@Url.Content("~/Scripts/ajaxupload.js")" type="text/javascript"></script>
}
<script type="text/javascript">
    $(document).ready(function () {
        $(".changeImageDiv").hide();
        $(".userImg").mouseover(function () {
            $(".changeImageDiv").slideUp(300).delay(800).fadeIn(400);
        }).mouseout(function () {
            $(".changeImageDiv").delay(2200).hide(1);
        });
        var thumb = $('img#userThumb');
        new AjaxUpload('#imageUpload', {
            action: '@Url.Action("SaveUserImage")',
            name: 'image',
            onSubmit: function (file, extension) {
                debugger;
                $('#userThumb').addClass('loading');
            },
            onComplete: function (file, response) {
                
                thumb.load(function () {
                    $('#userThumb').removeClass('loading');
                    thumb.unbind();
                });
                thumb.attr('src', '@Url.Action("GetUserImage")');
            }
        });
    });
</script>
<div class="tabscontainer">
    <div class="tabs">
        <div class="tab selected first" id="tab_menu_1">
            <div class="link">@Html.ActionLink("My Profile", "MyAccount", "Account")</div>
            <div class="arrow">
            </div>
        </div>
        <div class="tab last" id="tab_menu_2">
            <div class="link">
                @Html.ActionLink("Change Password", "ChangePassword", "Account")
            </div>
        </div>
    </div>
    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true, "User Has been updated successfully")
        <div class="curvedContainer">
            <div class="tabcontent" id="tab_content_1" style="display: block">
                <div class="Accountcontainer">
                    <div style="width: 100%; height: 150px; float: left;">
                        <div class="UserImage">
                            <div style="width: 150px; height: 150px; float: left;">
                            <div class="preview">
                                <img id="userThumb" src="@Url.Action("GetUserImage", "Account")" style="width:150px; height:120px;display: block;" class="userImg" alt=""/>
                                </div>
                                <div class="changeImageDiv" style="height: 20px;width: 150px; padding-left: 30px;
                                    margin-bottom: 20px; z-index: 150; position: absolute;">
                                    <input type="file" id="imageUpload" size="20" class=" " />
                                </div>
                            </div>
                            <div class="upload">
                            </div>
                        </div>
                        <div class="EditImage">
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.Name) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.Name)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.EmailID) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.EmailID)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.DOB) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.DOB)
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="left">
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.ManagerName) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.ManagerName)
                            </div>
                        </div>
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.SkillSets) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.SkillSets)
                            </div>
                        </div>
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.TeamName) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.TeamName)
                            </div>
                        </div>
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.CUGNumber) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.CUGNumber)
                            </div>
                        </div>
                    </div>
                    <div class="right">
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.CSCJoiningDate) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.CSCJoiningDate)
                            </div>
                        </div>
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.ProjectJoiningDate) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.ProjectJoiningDate)
                            </div>
                        </div>
                        <div class="Accountformtr">
                            <div class="myaccountlabes">
                                @Html.LabelFor(m => m.Location) :
                            </div>
                            <div class="myaccountfield">
                                @Html.DisplayFor(m => m.Location)
                            </div>
                        </div>
                        <div class="Accountformtr">
                        </div>
                    </div>
                    <div style="height: 10px; float: left; width: 100%;">
                    </div>
                    <div class="accountEditButton">
                        <a href="@Url.Action("EditMyInfo")" class="button orange medium">Edit</a>
                    </div>
                </div>
            </div>
        </div>
    }
</div>
